package com.jswlw.entity.biz;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jswlw.entity.PageRequest;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DevInfo extends PageRequest {

    private String id;

    private String name;

    private Integer devTypeId;

    private Integer billTypeId;

    private String devTypeName;

    private Integer devStatus;

    private Integer screenStatus;

    private Integer remainFlow;

    private Integer remainTime;

    private Integer usedFlow;

    private Integer usedTime;

    private Integer purityTds;

    private Integer rawTds;

    private String imei;

    private String icCid;

    private Integer onlineStatus;

    private Integer repairNum;

    private Integer asignal;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date bindTime;

    private Integer bindStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date onlineTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private Integer distributorId;

    private String distributorName;

    private String userName;

    private String tel;

    private String address;

    private Integer userId;

    private String province;

    private String city;

    private String district;

    private Integer lac;

    private Integer filterFlag;

    private List<Integer> distributorIds;

    public static DevInfo fill() {
        return DevInfo.builder()
                .devTypeId(0)
                .devStatus(0)
                .bindStatus(0)
                .bindTime(new Date())
                .createTime(new Date())
                .asignal(0)
                .repairNum(0)
                .rawTds(0)
                .build();
    }
}